home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Information
/
CSMP Digest
/
volume 3
/
csmp-digest-v3-047
< prev
next >
Wrap
Text File
|
1995-12-31
|
47KB
|
1,264 lines
Received-Date: Tue, 26 Jul 1994 19:05:06 +0200
From: pottier@clipper.ens.fr (Francois Pottier)
Subject: csmp-digest-v3-047
To: csmp-digest@ens.fr
Date: Tue, 26 Jul 1994 19:05:02 +0200 (MET DST)
X-Mailer: ELM [version 2.4 PL23]
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Errors-To: listman@ens.fr
Reply-To: pottier@clipper.ens.fr
X-Sequence: 50
C.S.M.P. Digest Tue, 26 Jul 94 Volume 3 : Issue 47
Today's Topics:
AIFF
Announcing Macintosh AIFF-based DSP Think C Toolbox
AppleEvent Question
Bug in MIDI.h (Universal Interface)
Full file path?
Looking for a friendly native component sample.
Newbie ?: Where to get good reference materials
Problem using FSpGet-SetFInfo
list of crossplatform OO (C++, Smalltalk) development tools
The Comp.Sys.Mac.Programmer Digest is moderated by Francois Pottier
(pottier@clipper.ens.fr).
The digest is a collection of article threads from the internet newsgroup
comp.sys.mac.programmer. It is designed for people who read c.s.m.p. semi-
regularly and want an archive of the discussions. If you don't know what a
newsgroup is, you probably don't have access to it. Ask your systems
administrator(s) for details. If you don't have access to news, you may
still be able to post messages to the group by using a mail server like
anon.penet.fi (mail help@anon.penet.fi for more information).
Each issue of the digest contains one or more sets of articles (called
threads), with each set corresponding to a 'discussion' of a particular
subject. The articles are not edited; all articles included in this digest
are in their original posted form (as received by our news server at
nef.ens.fr). Article threads are not added to the digest until the last
article added to the thread is at least two weeks old (this is to ensure that
the thread is dead before adding it to the digest). Article threads that
consist of only one message are generally not included in the digest.
The digest is officially distributed by two means, by email and ftp.
If you want to receive the digest by mail, send email to listserv@ens.fr
with no subject and one of the following commands as body:
help Sends you a summary of commands
subscribe csmp-digest Your Name Adds you to the mailing list
signoff csmp-digest Removes you from the list
Once you have subscribed, you will automatically receive each new
issue as it is created.
The official ftp info is //ftp.dartmouth.edu/pub/csmp-digest.
Questions related to the ftp site should be directed to
scott.silver@dartmouth.edu. Currently no previous volumes of the CSMP
digest are available there.
Also, the digests are available to WAIS users. To search back issues
with WAIS, use comp.sys.mac.programmer.src. With Mosaic, use
http://www.wais.com/wais-dbs/comp.sys.mac.programmer.html.
-------------------------------------------------------
>From elronx@athena.mit.edu (Elron A Yellin)
Subject: AIFF
Date: 8 Jul 1994 16:17:00 GMT
Organization: Massachusetts Institute of Technology
Can anyone tell me the current standard for
the Audio Interchange File Format? I've been
having trouble finding the publication, and I
don't know when it was last updated.
Any help would be much appreciated.
Elron A. Yellin
+++++++++++++++++++++++++++
>From Manuel Veloso <veloso@netcom.com>
Date: Sat, 9 Jul 1994 18:55:29 GMT
Organization: Ibex Productions
In article <2vju5s$kh2@senator-bedfellow.MIT.EDU> Elron A Yellin, elronx@athena.mit.edu
writes:
>Can anyone tell me the current standard for
>the Audio Interchange File Format? I've been
>having trouble finding the publication, and I
>don't know when it was last updated.
>Any help would be much appreciated.
>
This is from the audio FAQ, and probably will help. Both AIFF and
AIFC are also documented in IM-6 (Sound Manager)
- ----------------------------------------------------------------------
AIFF Format (Audio IFF) and AIFC
- ------------------------------
This format was developed by Apple for storing high-quality sampled
sound and musical instrument info; it is also used by SGI and several
professional audio packages (sorry, I know no names). An extension,
called AIFC or AIFF-C, supports compression (see the last item below).
I've made a BinHex'ed MacWrite version of the AIFF spec (no idea if
it's the same text as mentioned below) available by anonymous ftp from
ftp.cwi.nl [192.16.184.180]; the file is /pub/audio/AudioIFF1.2.hqx.
But you may be better off with the AIFF-C specs, see below.
Mike Brindley (brindley@ece.orst.edu) writes:
"The complete AIFF spec by Steve Milne, Matt Deatherage (Apple) is
available in 'AMIGA ROM Kernal Reference Manual: Devices (3rd Edition)'
1991 by Commodore-Amiga, Inc.; Addison-Wesley Publishing Co.;
ISBN 0-201-56775-X, starting on page 435 (this edition has a charcoal
grey cover). It is available in most bookstores, and soon in many
good librairies."
According to Mark Callow (msc@sgi.com):
A PostScript version of the AIFF-C specification is available via
anonymous ftp on FTP.SGI.COM (192.48.153.1) as /sgi/aiff-c.9.26.91.ps.
---------------------------
>From bdenckla@husc10.harvard.edu (Benjamin Denckla)
Subject: Announcing Macintosh AIFF-based DSP Think C Toolbox
Date: 11 Jul 1994 19:03:46 GMT
Organization: Harvard University, Cambridge, MA
Now available from ftp.cs.jhu.edu in directory "pub/dsp":
AIFF-based DSP C Framework
This archive contains a Macintosh Think C library which provides a
framework in which user-written C functions which process the data in AIFF
files may be run. The library contains main() and deals with all aspects
of AIFF file handling, allowing the user to concentrate on his/her
processing algorithm by writing only a small "plug-in" processing module
with very short development time. The library uses a block-processing
strategy in order to reduce the function-call overhead when the
user-written processing function is called. The block-processing approach
is also necessary because the large size of many AIFF files makes them
impossible to load entirely into memory.
The framework calls three user-written functions in the course of its
execution. First it calls the user-written initialization function
init_process(), which would typically be used for tasks such as the setup
of lookup tables. Then it repeatedly calls the user-written processing
function process_samdat(), each time placing a new block of data in the
buffer. When the data has been exhausted, it calls the user-written
termination function term_process(), which would typically be used for
tasks such as freeing memory which the user had allocated in init_process().
Though the framework is designed for the processing of AIFF files where
an AIFF file is taken as input and an AIFF file is made as output,
through the setting of user-defined variables, the framework can be made
to take no input or make no output. If the variable take_input is set to
zero, the framework will not make an attempt to open an input file. This
mode is useful for tasks such as the generation of AIFF files by
algorithmic means. If the variable make_output is set to zero, the
framework will not make an attempt to open an output file. This mode is
useful for tasks such as the analysis of AIFF files, where the analysis
output goes to the screen or a non-AIFF file.
The framework exists in source form in the folder "framework source" and
in object code form as "framework.lib". The source uses a few Think C
extensions to C, but I suspect that it could be ported to other compilers
or even other platforms without great difficulty as long as the
assumptions about the size of data types listed in "aiff.h" hold true.
If you want to link from the sources, the linkage required is specified
at the beginning of the file "aiff.c". Linkage for the library is the
same except for the fact that aiff.c and interface.c need not be linked
since they are what the library contains.
Much more could be written about how to use the framework but time
constraints compel me to merely direct the reader to the examples in the
folder "example plug-in source" and to the source for the framework itself.
This project was funded in part by the Ford Foundation's project to
provide grants for undergraduate research at Harvard University.
Don't bother dowloading this document as a separate text file: it is
already included in the archive.
Ben Denckla
bdenckla@husc.harvard.edu
July 9, 1994
---------------------------
>From Andrew_Bell@acd.org (Andrew Bell)
Subject: AppleEvent Question
Date: 06 Jul 1994 17:44:15 GMT
Organization: Apple Corps of Dallas User Group
Hi. I'm writing an application which allows users to edit various aspects of
their FC Settings Files. I've written the code for AppleEvents, and when you
drag your settings file on my App, it works perfectly. My problem is this: I
want my user to be greeted with a standard open dialog box if they didn't
drag a file on my app. My code is set up like this:
Install Apple Events
{Main Event Loop}
Is there any way I can execute some code if I'm not gonna receive an OpenDocs
event? I'm coding this in Pascal.
Thanks in Advance,
Andrew.
andrewb@metronet.com
+++++++++++++++++++++++++++
>From jwbaxter@olympus.net (John W. Baxter)
Date: Wed, 06 Jul 1994 15:40:02 -0700
Organization: Internet for the Olympic Peninsula
In article <893579165.3110756@acd.acd.org>, Andrew_Bell@acd.org wrote:
> Hi. I'm writing an application which allows users to edit various aspects of
> their FC Settings Files. I've written the code for AppleEvents, and when you
> drag your settings file on my App, it works perfectly. My problem is this: I
> want my user to be greeted with a standard open dialog box if they didn't
> drag a file on my app. My code is set up like this:
>
> Install Apple Events
> {Main Event Loop}
You should (barring some late-breaking additions) receive one of three
events after your application is launched. [Note: I'm assuming you don't
want to support System 6, too...if you do, see Inside Mac, where this is
all spelled out.]
'aevt'/'oapp': "Your application has been double-clicked"
'aevt'/'odoc': "You should open these documents"
'aevt'/'pdoc': "You should print these documents" (Finder follows this
with 'aevt'/'quit' if the user selected a doc and chose the Print command,
and you weren't already running...you don't have to keep track of that bit
of state information).
So by that model, when you launch, you do the setup which is common
among those three cases. Then you wait for one of the events to come in,
and handle it. The 'oapp' means, in your case, put up the dialog (in
other cases it means create an untitled document, or whatever).
Note that two more possibilities have arisen recently: you get
launched and none of the three events arrives (you can time out and assume
'oapp' for that one, if you want to); you get a no-op event in (I forget
the class and ID). That is the "none of the other three" case made
explicit, and implies: don't do anything until you're told...I'll get
around to it sometime.
--John
--
John Baxter Port Ludlow, WA, USA [West shore, Puget Sound]
No hablo Intel.
jwbaxter@pt.olympus.net
+++++++++++++++++++++++++++
>From Mark Hanrek <hanrek@cts.com>
Date: Thu, 7 Jul 1994 02:37:35 GMT
Organization: The Information Workshop
In article <893579165.3110756@acd.acd.org> Andrew Bell,
Andrew_Bell@acd.org writes:
> Hi. I'm writing an application which allows users to edit aspects of
> their FC Settings Files. I've written code for AppleEvents, and when you
> drag your settings on my App, it works perfectly. My problem is this: I
> want my user to be greeted with a standard open dialog if they didn't
> drag a file on my app. My code is set up like this:
>
> Install Apple Events
> {Main Event Loop}
>
> Is there any way I can execute some code if I'm not gonna receive an
> OpenDocs event? I'm coding this in Pascal.
>
> Thanks in Advance,
> Andrew.
> andrewb@metronet.com
Note that if your application does not receive one or more 'odoc' Apple
events, it will receive an 'oapp' instead. :)
Aha!!
Hope this helps.
Mark Hanrek
+++++++++++++++++++++++++++
>From jonpugh@netcom.com (Jon Pugh)
Date: Thu, 7 Jul 1994 03:47:35 GMT
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
Andrew Bell (Andrew_Bell@acd.org) wrote:
> Hi. I'm writing an application which allows users to edit various aspects of
> their FC Settings Files. I've written the code for AppleEvents, and when you
> drag your settings file on my App, it works perfectly. My problem is this: I
> want my user to be greeted with a standard open dialog box if they didn't
> drag a file on my app. My code is set up like this:
> Install Apple Events
> {Main Event Loop}
> Is there any way I can execute some code if I'm not gonna receive an OpenDocs
> event? I'm coding this in Pascal.
If you don't get an odoc, you will get an oapp. Put up the dialog then.
Jon
---------------------------
>From setsu@lab2.yamaha.co.jp (Takashi Suzuki)
Subject: Bug in MIDI.h (Universal Interface)
Date: Thu, 7 Jul 1994 04:13:18 GMT
Organization: 2nd dep. Electronics Development&Design Center YAMAHA, Japan.
I found a bug in MIDI.h (Universal Interface).
These lines :
- -------------------------------- from here -------------------------------
#if defined(powerc) || defined (__powerc)
#pragma options align=mac68k
#endif
struct MIDIPortParams {
OSType portID; /*ID of port, unique within client*/
short portType; /*Type of port - input, output, time, etc.*/
short timeBase; /*refnum of time base, 0 if none*/
long offsetTime; /*offset for current time stamps*/
Ptr readHook; /*routine to call when input data is valid*/
long refCon; /*refcon for port (for client use)*/
MIDIClkInfo initClock; /*initial settings for a time base*/
Str255 name; /*name of the port, This is a real live string, not a
ptr.*/
};
#if defined(powerc) || defined(__powerc)
#pragma options align=reset
#endif
- -------------------------------- until here -------------------------------
should be someting like:
- -------------------------------- from here -------------------------------
typedef pascal short (*ReaderDefProcPtr)(MIDIPacketPtr myPacket, long myRefCon);
enum {
uppReaderDefProcInfo = kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(short)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
};
#if USESROUTINEDESCRIPTORS
typedef UniversalProcPtr ReaderDefUPP;
#define NewReaderDefProc(userRoutine) \
(ReaderDefUPP) NewRoutineDescriptor((ProcPtr)(userRoutine),
uppReaderDefProcInfo, GetCurrentISA())
#else
typedef ReaderDefProcPtr ReaderDefUPP;
#define NewReaderDefProc(userRoutine) \
(ReaderDefUPP)(userRoutine)
#endif
#if defined(powerc) || defined (__powerc)
#pragma options align=mac68k
#endif
struct MIDIPortParams {
OSType portID; /*ID of port, unique within client*/
short portType; /*Type of port - input, output, time, etc.*/
short timeBase; /*refnum of time base, 0 if none*/
long offsetTime; /*offset for current time stamps*/
ReaderDefUPP readHook; /*routine to call when input data is valid*/
long refCon; /*refcon for port (for client use)*/
MIDIClkInfo initClock; /*initial settings for a time base*/
Str255 name; /*name of the port, This is a real live string, not a
ptr.*/
};
#if defined(powerc) || defined(__powerc)
#pragma options align=reset
#endif
- -------------------------------- until here -------------------------------
Without this modification, applications will run into debugger
when they receive MIDI data.
-- T.Suzuki
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Takashi Suzuki 2nd dep. Electronics Development & Design Center YAMAHA
_///_ Email : setsu@lab2.yamaha.co.jp
(.)-(.)~ NIFTY : GAF03072@niftyserve.or.jp
o Tel : +81-539-62-5335 ; Fax :+81-539-62-5269
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---------------------------
>From jbeeghly@u.washington.edu (Jeff Beeghly)
Subject: Full file path?
Date: 9 Jul 1994 20:36:07 GMT
Organization: University of Washington
OK, I come from a unix & a DOS background, and I'm trying to learn MAC
programming. My latest battle has been with the Mac file system...
OK, If I have the following drive structure:
Internal ROOT DRIVE
|
|
------Applications Folder
|
|
--------Adobe Photoshop Folder
|
|
-------------Photoshop Application
On the Unix side, I'd expect the file position structure to be
Internal/Applications/Adobe Photoshop/Photoshop
On the Mac, it would be
Internal:Applications:Adobe Photoshop:Photoshop
Well, I'm using the following to call the Open Dialog
StandardFileReply reply;
StandardGetFile(0L, -1, 0L, &reply);
In THINK Reference, it states that the StandardFileReply contains a
FSSpec variable called sfFile, which is made up of the following structure:
FSSpec {
short vRefName;
long parID;
Str63 name;
};
Well, I know that reply.sfFile.name contains just the name of the file,
and if I under stand correctly, the root drive (or the volume reference)
is stored as a number, and the directory that the file was in is also
stored as a number. OK, fine. But how do I get the text of the location?
In other words, how can I use the vRefNum, parID, & name menbers to get
the string "Internal:Applications:Adobe Photoshop:Photoshop" ?
Also, I cave a couple books on programming the Mac, but none of them
really talk about files on the Mac. Other than Inside Mac, are there any
good books out there that cover this issue?
+++++++++++++++++++++++++++
>From rmah@panix.com (Robert Mah)
Date: Sat, 09 Jul 1994 18:26:21 -0500
Organization: One Step Beyond
jbeeghly@u.washington.edu (Jeff Beeghly) wrote:
) OK, I come from a unix & a DOS background, and I'm trying to learn
) MAC programming. My latest battle has been with the Mac file system.
) ...
) Well, I know that reply.sfFile.name contains just the name of the
) file, and if I under stand correctly, the root drive (or the volume
) reference) is stored as a number, and the directory that the file was
) in is also stored as a number. OK, fine. But how do I get the text
) of the location?
)
) In other words, how can I use the vRefNum, parID, & name menbers to
) get the string "Internal:Applications:Adobe Photoshop:Photoshop"?
You should think carefully before using full pathnames in non-developer
oriented applications. Unlike UNIX and DOS, Mac users change their
volume, folder and file names and move files and folders around with
abandon and wanton disregard for programmer's perconceptions.
If you're trying to save the file's location, you should REALLY think
about using aliases instead. One of the few times I can think of to use
full pathnames is to pass it to the stdio fopen() function.
If you really do need to get the full path name, there is sample code
from Apple available on the developer CD's and at:
ftp://ftp.apple.com/dts/mac/sc/snippets/files/
It's basically a matter of walking up the directory tree using repeated
calls to _PBGetCatInfo. Oh and remember, you could be running under
A/UX so check before assuming ":" is the pathname delimiter.
Cheers,
Rob
_____________________________________________________________________
Robert S. Mah : Macintosh software development : 212.947.5607
One Step Beyond : and network consulting : rmah@panix.com
+++++++++++++++++++++++++++
>From bhorling@mail.trincoll.edu (Bryan Horling)
Date: Sat, 09 Jul 1994 19:51:00 -0500
Organization: Trinity College
In article <rmah-0907941826210001@rmah.dialup.access.net>, rmah@panix.com
(Robert Mah) wrote:
> jbeeghly@u.washington.edu (Jeff Beeghly) wrote:
>
> ) OK, I come from a unix & a DOS background, and I'm trying to learn
> ) MAC programming. My latest battle has been with the Mac file system.
> ) ...
> ) Well, I know that reply.sfFile.name contains just the name of the
> ) file, and if I under stand correctly, the root drive (or the volume
> ) reference) is stored as a number, and the directory that the file was
> ) in is also stored as a number. OK, fine. But how do I get the text
> ) of the location?
> )
> ) In other words, how can I use the vRefNum, parID, & name menbers to
> ) get the string "Internal:Applications:Adobe Photoshop:Photoshop"?
>
> You should think carefully before using full pathnames in non-developer
> oriented applications. Unlike UNIX and DOS, Mac users change their
> volume, folder and file names and move files and folders around with
> abandon and wanton disregard for programmer's perconceptions.
>
> If you're trying to save the file's location, you should REALLY think
> about using aliases instead. One of the few times I can think of to use
> full pathnames is to pass it to the stdio fopen() function.
>
> If you really do need to get the full path name, there is sample code
> from Apple available on the developer CD's and at:
>
> ftp://ftp.apple.com/dts/mac/sc/snippets/files/
>
> It's basically a matter of walking up the directory tree using repeated
> calls to _PBGetCatInfo. Oh and remember, you could be running under
> A/UX so check before assuming ":" is the pathname delimiter.
>
Looking at this in reverse, how can I use a full pathname to access a file
or folder location to save or read from? I'm writing an on-line
application form in which I'm going to have the results saved to a server
on the network (we're currently grappling with mounting said server)
without user intervention (so StandardPutFile won't work), and the path to
this spot will always be the same. I have yet to find an easy way to
specify this path in a useable form, although Think Ref says that it can
be done. Does anyone have any suggestions? Thanks.
> Cheers,
> Rob
> _____________________________________________________________________
> Robert S. Mah : Macintosh software development : 212.947.5607
> One Step Beyond : and network consulting : rmah@panix.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
--Bryan Horling-- | >>bhorling@mail.trincoll.edu<<
-Head Consultant- | Trinity College, #1720
-A valuble low fat source- | 300 Summit St
-of protein and vitamin C- | Hartford, CT 06106-3100
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+++++++++++++++++++++++++++
>From rmah@panix.com (Robert Mah)
Date: Sat, 09 Jul 1994 22:52:44 -0500
Organization: One Step Beyond
bhorling@mail.trincoll.edu (Bryan Horling) wrote:
) Looking at this in reverse, how can I use a full pathname to access
) a file or folder location to save or read from? I'm writing an
) on-line application form in which I'm going to have the results
) saved to a server on the network (we're currently grappling with
) mounting said server) without user intervention (so StandardPutFile
) won't work), and the path to this spot will always be the same. I
) have yet to find an easy way to specify this path in a useable
) form, although Think Ref says that it can be done. Does anyone
) have any suggestions? Thanks.
Use aliases. Full aliases will automount AppleShare servers, and
with the ARA extension, even dialup ARA servers before mounting
server volumes. Aliases are good.
Cheers,
Rob
_____________________________________________________________________
Robert S. Mah : Macintosh software development : 212.947.5607
One Step Beyond : and network consulting : rmah@panix.com
+++++++++++++++++++++++++++
>From rkwee@ee.pdx.edu (Roland Kwee)
Date: 9 Jul 1994 22:26:39 -0700
Organization: (none)
jbeeghly@u.washington.edu (Jeff Beeghly) writes:
>OK, I come from a unix & a DOS background, and I'm trying to learn MAC
>programming. My latest battle has been with the Mac file system...
Same with me. I wrote code to obtain full path names like the Pascal
example in New Inside Mac/Files (but in C, of course). In fact, I wrote
a set of functions to hide the Mac-style file IDs and to simulate
the Unix-way. This makes code much more portable. Of course, the real
Mac-programmer never wants his/her code to be portable to, say, a PC,
but it is still useful to port ANSI-C/Unix-compatible code to the Mac.
Please send me email if you want me to mail you my code (I like peer
review of my code) or to post it in the newsgroup.
--Roland email: RolandKwee@ACM.org
+++++++++++++++++++++++++++
>From d88-jwa@hemul.nada.kth.se (Jon Wdtte)
Date: 11 Jul 1994 08:31:54 GMT
Organization: The Royal Institute of Technology
In <bhorling-0907941951000001@spam.pc.trincoll.edu> bhorling@mail.trincoll.edu (Bryan Horling) writes:
>Looking at this in reverse, how can I use a full pathname to access a file
>or folder location to save or read from? I'm writing an on-line
1) If the path is shorter than 256 characters, just call
FSpMakeFSSpec on the name with a 0 volume and directory ID.
2) Else use NewAliasMinimalFromFullPath and the ResolveAlias on it.
>on the network (we're currently grappling with mounting said server)
>without user intervention (so StandardPutFile won't work), and the path to
>this spot will always be the same. I have yet to find an easy way to
The easiest thing would be to have a preferences setting for
where this "spot" is (check the snippet for getting a folder if
you can't choose a file)
Then create an alias to it with NewAlias, and store the alias
data in your preferences document. When the user starts, resolve
the alias using ResolveAlias, and you will not only get an FSSpec
for the alias target, you'll also get the server automatically
mounted, for free.
Cheers,
/ h+
--
-- Jon W{tte, h+@nada.kth.se, Mac Software Engineer Deluxe --
Hackers push all the right buttons.
---------------------------
>From ramapo@crestone.ssd.kodak.com (Pete Hoch x39699)
Subject: Looking for a friendly native component sample.
Date: Thu, 7 Jul 1994 13:02:54 GMT
Organization: Eastman Kodak Company
I am looking for an example or description of anything I need to do to
make a component native. It does not need to be a fat component I just
need to know if there are any special things I need to do for a native
component. I have allready looked on the QuickTime 2.0 beta CD and I
have found nothing.
Thanks,
Pete
+++++++++++++++++++++++++++
>From tgaul@halcyon.com (Troy Gaul)
Date: Fri, 08 Jul 1994 00:27:08 -0700
Organization: Infinity Systems
In article <CsKMww.6n8@newsserver.pixel.kodak.com>,
ramapo@crestone.ssd.kodak.com (Pete Hoch x39699) wrote:
> I am looking for an example or description of anything I need to do to
> make a component native. It does not need to be a fat component I just
> need to know if there are any special things I need to do for a native
> component. I have allready looked on the QuickTime 2.0 beta CD and I
> have found nothing.
Look up technical note QT 05 - Component Manager version 3.0. It
describes how to do native and fat components.
For development, I got a component working as an accelerated resource with
CodeWarrior 3, and then I just used an old-style 'thng' resource format.
I had problems when trying to use the extended format with a MW-generated
code resource, but those problems may have been related to including the
wrong library file in the project (I had included the ColorSyncStubs
library from CW3, but the version of ColorSync I had installed had the
shared library named 'ColorSync', so there was a runtime linking error).
_troy
//////// //////___Troy Gaul__________________________tgaul@halcyon.com___//
// // Infinity Systems ; Redmond, Washington //
// // // Good news is just life's way of keeping you off balance //
// //////__________________________________________________________//
---------------------------
>From paulw@crl.com (Paul Winterrowd)
Subject: Newbie ?: Where to get good reference materials
Date: 8 Jul 1994 09:46:58 -0700
Organization: CRL Dialup Internet Access (415) 705-6060 [login: guest]
The subject says it all. The IM books I've looked at contain
Pascal code and I code in C. Is there a way to get these
reference books with C code/function specifications as opposed
to Pascal? I've read the Mac Programming FAQ and have not
found an adequate answer.
My main interest at this point is with Quickdraw; however, it
appears like I'm going to have to order the IM: Imaging book
as the local bookstore does not have this volume. Also, it
appears to have been left off of the bookmark CD which came
with my new Develop subscription. The IM: Overview reference
lists the Imaging volume as dealing with Quickdraw. Are there
any other volumes that contain information on this portion of
the toolbox or does this one cover it all?
I've been told that a company will be coming out with the complete
IM reference series on CD later this summer; however, I really
need this information now and I don't know if they are going to
do any better with providing C code examples.
Email replies are appreciated as I only read this newsgroup once
or twice a week.
Thanks,
paulw@aha.com
--
- ---------------------------------------------------------------
I only speak for myself.
+++++++++++++++++++++++++++
>From Mark Hanrek <hanrek@cts.com>
Date: Mon, 11 Jul 1994 02:08:16 GMT
Organization: The Information Workshop
In article <2vjvu2$iiu@crl.crl.com> Paul Winterrowd, paulw@crl.com writes:
> The subject says it all. The IM books I've looked at contain
> Pascal code and I code in C. Is there a way to get these
> reference books with C code/function specifications as opposed
> to Pascal? I've read the Mac Programming FAQ and have not
> found an adequate answer.
>
> My main interest at this point is with Quickdraw; however, it
> appears like I'm going to have to order the IM: Imaging book
> as the local bookstore does not have this volume. Also, it
> appears to have been left off of the bookmark CD which came
> with my new Develop subscription. The IM: Overview reference
> lists the Imaging volume as dealing with Quickdraw. Are there
> any other volumes that contain information on this portion of
> the toolbox or does this one cover it all?
>
> I've been told that a company will be coming out with the complete
> IM reference series on CD later this summer; however, I really
> need this information now and I don't know if they are going to
> do any better with providing C code examples.
>
> Email replies are appreciated as I only read this newsgroup once
> or twice a week.
>
> Thanks,
>
> paulw@aha.com
Paul and other newbies,
Here is some "perspective" that will help save you loads of time...
- ---- Pascal in Reference Documentation
Pascal is to a large degree a descendant of "algol", which is a language
from the sixties that was widely accepted as a standard way of
communicating "algorithms". ( ALGOrithmic Language: algol ) It was a
kind of a "language-independent langauge".
Pascal is being used in a similar way in Inside Mac. An "algorithm" is
being communicated when you see examples in Pascal. It is ourselves who
mistakenly think that it is should be useful as more than that, like
"working code". :) I made the same mistake myself.
In fact, very little code that is shown in reference books actually works
in the real world. Even if examples were given in C, it would be little
help.
It is important to not attempt to write software from a reference book.
Working from documentation is like
reading about a dead fish out of water.
Example source code takes you
directly to the living aquarium.
One has to have both in order to be successful.
One form (reference docs) shows the given thing in isolation so that it
can be understood, the other (source code) contains all the other
real-world things that must be "around it" in order for it to actually
work.
Also, when you think about it, what is the most perfect language for
communicating how to write software? Yes, "example source code", and in
the language you can speak!
There is quite a difference between "statements", and "example source
code", too.
At one point I did a close examination and quickly saw that there are few
toolbox calls remaining where you can simply look it up in the book, type
it into your program, and that's that.
An aquarium is a "system" of intertwined and interdependent things. If
just one element is missing, or even the pH is a little out of whack,
it's a dead aquarium.
- ---- Specific answer
You asked about QuickDraw. As a seasoned Macintosh graphics programmer,
I can tell you that this is a perfect case-in-point. The documentation
conveys only a fraction of what you must know.
In some areas, such as the proper way to handle color tables, especially
between applications, there is little or no information whatsoever
including example source code.
Questions about QuickDraw, GWorlds, and CopyBits get asked every single
day in c.s.m.p., endlessly, because new programmers are left to fend for
themselves, and unfortunately are not guided along like they could be
with a gentle tractor beam.
Well, "tractor beam on" ...
- ---- A Successful Strategy
New programmers have their choice of accepting the following strategy
now, or realizing it is true way later, the hard way. :)
I say this because this isn't a time to be fooling around. We
desperately need all the Macintosh programmers we can get, and large
numbers throw in the towel part way through because it becomes too much.
More often than not, this is preventable. We'd rather you remain in
orbit, and not burn up re-entering the atmosphere. :)
Keep in mind that the programmer who finishes *first* wins all the toys,
not the programmer who can handle the most complexity.
Don't screw around with things that waste your time. Be belligerent and
demanding about "getting on with it" already! Sheesh!! ( like that :)
- ---- One word: Resources
Success is all about "resources". There are many equally essential
resources, not just one.
Have as many as you can "on tap", at your fingertips, or quickly
accessible. This is one basis upon which you will compete with other
programmers.
All along the way, continuously accumulate resources -- download example
source code, collect tidbits of info you can tell you'd never figure out
in a million years, collect references to things you'll "wish you had
saved when you came across it", etc.
Essentials for success:
* Access to the Internet, America Online, or CompuServe.
* Become a "source code pack rat".
* Get ftp access to "ftp.apple.com". Quietly take full advantage
of this gold mine until you can afford your own CD player and
subscriptions. The example source code "word" is available here,
and on the Developer CD.
* Participate in an online programming forum regularly. The AOL
Development Forum is a great one for beginners if c.s.m.p. seems
inappropriate. Also, you don't have to say a word, yet you'll
learn a ton of things subliminally, and allows you to feel
"connected" with what's happening at the same time.
* The "buddy system" is good for programming, too.
* Remember that if you have trouble understanding something,
or great difficulty doing something simple, don't blame yourself.
We are still going through the phase where programmers have
yet to realize that they too can have development software as
powerful and advanced as the software they create for their
clients or employers routinely every day.
* Essential Reference Information:
* Inside Mac ( paper books sure are handy )
* Think Reference ( even handier! )
* All three volumes of c.s.m.p digest
( for all the undocumented things )
* Wisdoms that give you competitive advantage...
* You cannot assess how long things will take
* Don't allow your time to be wasted
* Stand on the shoulders of work already done
* Just say "no"
- -----------------------------------------------------------
Only you know what is best for you. Use this information to help
increase your advantage.
Hope this helps.
Mark Hanrek
The Information Workshop
---------------------------
>From system@asuvax.eas.asu.edu (Marc Lesure)
Subject: Problem using FSpGet-SetFInfo
Date: Fri, 8 Jul 1994 08:19:59 GMT
Organization: Arizona State University
I'm having problems using FSpGetFInfo and FSpSetFInfo on a folder. They
always return an error of -43 (fnfErr). IM VI states that these functions
can be used on files or folders. Here is my code segment, could some kind
soul show me what's wrong.
OSErr err;
FSSpec mfs;
int vRef;
long dirID, newdID;
FInfo fndrInfo;
/* get system folder */
err=FindFolder(kOnSystemDisk,kSystemFolderType,kDontCreateFolder,&vRef,&dirID);
/* get MyFolder */
err=FSMakeFSSpec(vRef,dirID,"\pMyFolder",&mfs);
/* create it if it doesn't exist */
if(err==fnfErr)
err=FSpDirCreate(&mfs,smSystemScript,&newdID);
err=FSpGetFInfo(&mfs,&fndrInfo);
...
err=FSpSetFInfo(&mfs,&fndrInfo);
The FSpGet/SetFInfo calls fails regardless if the folder preexisted or if
the code creates it. It doesn't seem to matter if fndrInfo is defined as
FInfo or DInfo.
Thanks for any help!!!
- ---------------------------------------------------------------------
Marc Lesure / Arizona State University / Tempe, AZ
"Between the world of men and make-believe, I can be found..."
"False faces and meaningless chases, I travel alone..."
"And where do you go when you come to the end of your dream?"
UUCP: ...!ncar!noao!asuvax!lesure
Internet: lesure@asuvax.eas.asu.edu
+++++++++++++++++++++++++++
>From mclow@coyote.csusm.edu (Marshall Clow)
Date: 8 Jul 1994 09:24:40 -0700
Organization: California State University San Marcos
Marc Lesure (system@asuvax.eas.asu.edu) wrote:
>I'm having problems using FSpGetFInfo and FSpSetFInfo on a folder. They
>always return an error of -43 (fnfErr). IM VI states that these functions
>can be used on files or folders. Here is my code segment, could some kind
>soul show me what's wrong.
[ code deleted ]
I believe that IM lies on this one. Use GetCatInfo instead.
Marshall CLow
Aladdin Systems
mclow@san_marcos.csusm.edu
+++++++++++++++++++++++++++
>From jumplong@aol.com (Jump Long)
Date: 10 Jul 1994 02:11:08 -0400
Organization: America Online, Inc. (1-800-827-6364)
In article <CsM4HC.z0@asuvax.eas.asu.edu>, system@asuvax.eas.asu.edu (Marc
Lesure) writes:
>I'm having problems using FSpGetFInfo and FSpSetFInfo on a folder.
Both Inside Macintosh Volume VI and Inside Macintosh: Files are wrong.
FSpGetFInfo and FSpSetFInfo work only on files - they do not work on
directories. The following code (from the soon to be released version 1.2
of MoreFiles) does what you want.
- Jim Luther
/*************************************************************************
****/
pascal OSErr GetDInfo(short vRefNum,
long dirID,
StringPtr name,
DInfo *fndrInfo)
{
CInfoPBRec pb;
OSErr error;
pb.dirInfo.ioNamePtr = name;
pb.dirInfo.ioVRefNum = vRefNum;
pb.dirInfo.ioDrDirID = dirID;
pb.dirInfo.ioFDirIndex = 0; /* use ioNamePtr and ioDrDirID */
error = PBGetCatInfoSync(&pb);
if ( error == noErr )
{
if ( (pb.dirInfo.ioFlAttrib & ioDirMask) != 0 )
/* it's a directory, return the DInfo */
*fndrInfo = pb.dirInfo.ioDrUsrWds;
else
/* oops, a file was passed */
error = dirNFErr;
}
return ( error );
}
/*************************************************************************
****/
pascal OSErr FSpGetDInfo(const FSSpec *spec,
DInfo *fndrInfo)
{
return ( GetDInfo(spec->vRefNum, spec->parID, (StringPtr)spec->name,
fndrInfo) );
}
/*************************************************************************
****/
pascal OSErr SetDInfo(short vRefNum,
long dirID,
StringPtr name,
const DInfo *fndrInfo)
{
CInfoPBRec pb;
OSErr error;
pb.dirInfo.ioNamePtr = name;
pb.dirInfo.ioVRefNum = vRefNum;
pb.dirInfo.ioDrDirID = dirID;
pb.dirInfo.ioFDirIndex = 0; /* use ioNamePtr and ioDrDirID */
error = PBGetCatInfoSync(&pb);
if ( error == noErr )
{
if ( (pb.dirInfo.ioFlAttrib & ioDirMask) != 0 )
{
/* it's a directory, set the DInfo */
pb.dirInfo.ioDrUsrWds = *fndrInfo;
pb.dirInfo.ioDrDirID = dirID;
error = PBSetCatInfoSync(&pb);
}
else
/* oops, a file was passed */
error = dirNFErr;
}
return ( error );
}
/*************************************************************************
****/
pascal OSErr FSpSetDInfo(const FSSpec *spec,
const DInfo *fndrInfo)
{
return ( SetDInfo(spec->vRefNum, spec->parID, (StringPtr)spec->name,
fndrInfo) );
}
/*************************************************************************
****/
---------------------------
>From craig@gpu.utcc.utoronto.ca (Craig Hubley)
Subject: list of crossplatform OO (C++, Smalltalk) development tools
Date: Fri, 8 Jul 1994 00:39:31 GMT
Organization: Craig Hubley & Associates
Our recent search for crossplatform GUI development tools yielded the following
possibilities (in no particular order). Focus was on Windows+Mac portability
as that was the immediate problem. Some toolkits, notably XVT, C++/Views,
ObjectWorks/C++, etc., cover OS/2 and Unix as well. Many sources were used
but the search was not exhaustive. Some things we have only partial pointers
to. Would appreciate help filling them out. If you mail directly to me I
will incorporate this information into the table (without verifying it).
Most important would be 1-800 numbers, email addresses, and pointers to
review articles in major publications (e.g. Byte, PC Week, Computer Shopper...)
We focused on those usable from C++ or Smalltalk which can be extended using
these (almost-standard, multivendor now) languages:
product vendor
- ----- ------
InMark InMark???
WNDX WNDX Corp., Calgary, Alberta Canada (reviewed in Byte 1/94)
OpenGUI Guild Products Inc., Belmont CA
ObjectViews Quest Windows Corp, Santa Clara CA
Aspect Open Inc., Colorado Springs CO
ObjectWorks/C++ ParcPlace Systems, (408) area code
zApp Zinc (reviewed in Byte 1/94)
OpenDoc/MacApp Apple (supposedly soon to be released)
win32s Microsoft (supposedly crossplatform as of Visual C++ 2.0)
OWL 2.0 Borland (supposedly available for Macintosh
Appware Novell (Borland requires this I think)
Foundation
UI Series
VisualAppBuilder
Galaxy Visix (expensive)
??? Neuron Data (expensive)
XVT XVT (reviewed in Byte 1/94) - called 'easiest for C programmers'
Power++ XVT (very new)
C++/Views Liant, (508) area code, more like a Smalltalk library in C++
(also reviewed in Byte 1/94) - called the 'most disciplined'
We weren't really looking at this but for database libraries we turned up:
FoxPro Microsoft (can build DLLs to handle DB, and use from C/C++)
NeoAccess NeoLogic, San Francisco, CA (a C++ database library)
CommonBase ImageSoft
...
For Smalltalk we turned up:
Smalltalk/V Mac Digitalk
Smalltalk/V Win Digitalk
ENFIN Easel (app builder)
Subpanes ObjectShare (app builder)
Smalltalk-80 ParcPlace
VisualWorks ParcPlace (app builder)
VisualAge IBM (OS/2 only, Windows versions promised, includes app builder)
We weren't looking at graphics tools.
Some products, like Symantec's Bedrock and Borland's thing, seem not to exist
if you contact the companies directly. Possibly they were vaporware only. In
fact Symantec definitely folded their work into OpenDoc and MacApp recently.
If you turn up *anything* not on this list that is usable from C++ or Smalltalk
I would appreciate hearing about it. Other issues possibly worth discussing
(in the appropriate forums) would be:
- should there be a group devoted exclusively to platform-independent software
development (i.e. where the developer is targetting at least 2 or 3 user
platforms) - out of self-interest I would only be interested in tools that
generate code, or produce modules that can be linked into, C++ or Smalltalk.
(Frankly I think the world needs another single-vendor language, OO or not,
like a hole in its head, and would specifically exclude these from the group.
Your mileage may vary - I am not interested in discussing this issue at all
so if you feel differently *you* start the group).
- would someone be interested in expanding this list and making it a FAQ on
such a group ? I have little time for this but might consider it if someone
else took over administrative responsibilities.
For the moment I would be willing to gather and recirculate experiences of
those doing real world commercial product development using any of the above.
This too could eventually make it into a FAQ.
Thanks,
Craig Hubley -- Consultants in object-oriented technology, languages, --
Craig Hubley & Associates -- user interface design, user productivity --
craig@utcc.Utoronto.CA -- and financially responsive methodologies --
Seventy Eaton Avenue, Toronto, Ontario, Canada M4J 2Z5 -- 416-778-6136
--
Craig Hubley -- Consultants in object-oriented technology, languages, --
Craig Hubley & Associates -- user interface design, user productivity --
craig@utcc.Utoronto.CA -- and financially responsive methodologies --
Seventy Eaton Avenue, Toronto, Ontario, Canada M4J 2Z5 -- 416-778-6136
+++++++++++++++++++++++++++
>From MorrisGC@ccmail.apldbio.com (George Morris)
Date: 8 Jul 94 19:18:04 GMT
Organization: Perkin Elmer, Applied Biosystems Div.
In article <CsLJ5w.F55@gpu.utcc.utoronto.ca>, craig@gpu.utcc.utoronto.ca
(Craig Hubley) wrote:
> Our recent search for crossplatform GUI development tools yielded the
> following possibilities (in no particular order)
[material deleted]
> - would someone be interested in expanding this list and making it a FAQ on
> such a group ? I have little time for this but might consider it if someone
> else took over administrative responsibilities.
>
As regards cross-platform development systems there already exists an
excellent list of these systems with prices, summaries, user comments,
etc. in the PIGUI (platform-independent Graphical User Interface) FAQ.
This is available via anonymous FTP at rtfm.mit.edu (At least that is
where I got it). I believe it is also posted to the following newsgroups;
comp.windows.misc, comp.answers,news.answers.
Hope this helps
George Morris
MorrisGC@ccmail.apldbio.com
---------------------------
End of C.S.M.P. Digest
**********************